package com.jingdianjichi.subject.application.convert;

import com.jingdianjichi.subject.application.dto.SubjectInfoDTO;
import com.jingdianjichi.subject.domain.entity.SubjectInfoBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 题目DTO转换器
 */
@Mapper
public interface SubjectInfoDTOConverter {

    SubjectInfoDTOConverter INSTANCE = Mappers.getMapper(SubjectInfoDTOConverter.class);


    /**
     * 将BO转换为DTO
     *
     * @param subjectInfoDTO 题目BO
     * @return 题目DTO
     */
    SubjectInfoBO converDTOToInfoBO(SubjectInfoDTO subjectInfoDTO);

    SubjectInfoDTO converBOToInfoDTO(SubjectInfoBO subjectInfoBO);

    /**
     * 将BO转换为DTO
     *
     * @param subjectInfoBOList 题目BO
     * @return 题目DTO
     */
    List<SubjectInfoDTO> converBoListToInfoListDTO(List<SubjectInfoBO> subjectInfoBOList);
}
